package edu.jhu.tcj.purfuit;

import java.awt.Color;
import java.util.HashSet;
import java.util.Set;

public class Player {

	/** Player name */
	private String name;
	
	/** Player color */
	private Color color;

	/** Categories answered correctly */
	private Set<Category> categories = new HashSet<Category>();

	/** The Space the player is currently on */
	private Space space;

	public Player(String name, Color color) {
		this.name = name;
		this.color = color;
	}
	
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * @param color the color to set
	 */
	public void setColor(Color color) {
		this.color = color;
	}

	/**
	 * @return the color
	 */
	public Color getColor() {
		return color;
	}

	/**
	 * @param categories the categories to set
	 */
	public void addCompletedCategories(Category category) {
		categories.add(category);
	}

	/**
	 * @return the categories
	 */
	public Category[] getCompletedCategories() {
		return categories.toArray(new Category[categories.size()]);
	}

	/**
	 * @param space the space to set
	 */
	public void setSpace(Space space) {
		this.space = space;
	}

	/**
	 * @return the space
	 */
	public Space getSpace() {
		return space;
	}


}

